import cryptimport hashlibimport randomimport timefrom BWYG import settingsdef get_random_string(length=12,                      allowed_chars='abcdefghijklmnopqrstuvwxyz'                                    'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'):    """    Return a securely generated random string.    The default length of 12 with the a-z, A-Z, 0-9 character set returns    a 71-bit value. log_2((26+26+10)^12) =~ 71 bits    """    random.seed(        hashlib.sha256(            ('%s%s%s' % (random.getstate(), time.time(), settings.SECRET_KEY))                .encode()        ).digest()    )    return ''.join(random.choice(allowed_chars) for i in range(length))def make_password(password):    salt = crypt.mksalt(crypt.METHOD_SHA512)    return crypt.crypt(password, salt)def check_password(password, encoded):    return make_password(password) == encodedprint(check_password('123456','$63FxIFcQfKek'))